﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace HomeWork2
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private string okText;
        public string newText
        {
            get { return okText; }
            set { okText = value; }
        }

        private void RadioButton_Checked(object sender, RoutedEventArgs e)
        {
            newDescription("This type is called short byte and uses 8 bits. When RAM was something you only had 64MB or less to work with, using this type of data would make sure you only use the RAM needed.");
        }

        private void RadioButton_Checked_1(object sender, RoutedEventArgs e)
        {
            newDescription("This type is called short and uses 16 bits. Just like the sbyte, this is also a limited sized value to use less RAM than an int, but more than a sbyte.");
        }

        private void RadioButton_Checked_2(object sender, RoutedEventArgs e)
        {
            newDescription("This type is the new standard integer value used and it uses 32 bits. Now that we have Gigabites of RAM to work with, limiting the RAM used is not a big deal now.");
        }

        private void RadioButton_Checked_3(object sender, RoutedEventArgs e)
        {
            newDescription("This is a float type that uses 32 bits but also allows the use of decimals.");
        }

        private void newDescription(string p)
        {
            newText = p;
            description.Text = String.Empty;
            description.Text = okText;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }

    }
}
